﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DotNetNuke.Entities.Users;
using System.Xml.Linq;
using DotNetNuke.Security.Membership;
using BrandonHaynes.Membership.Factors.PromptControls;
using System.Web.UI;

namespace BrandonHaynes.Membership.Factors
	{
	/// <summary>
	/// This class exhibits "null authentication" in that it authenticates against any credential, and never
	/// prompts for additional information
	/// </summary>
	public class NullFactor : IAuthenticationFactor
		{
		#region IAuthenticationFactor Members

		public string Name { get { return "Null"; } }

		public void Authenticate(UserInfo user, Credential credential)
			{
			credential.Status = UserLoginStatus.LOGIN_SUCCESS;
			}

		public Control PromptControl
			{ get { return new NullPrompt(); } }

		#endregion
		}
	}
